﻿namespace Contoso.ActiveDirectory {

    #region Usings
    using System;
    using System.Collections.Generic; 
    #endregion

    public interface IUserAccount : IUserGroup, IUserComputer {
        IExchangeMailboxAttributes ExchangeMailboxAttributes { get; }
        string GivenName { get; }
        string HomeDirectory { get; }
        string HomeDrive { get; }
        bool IsAccountLockedOut { get; }
        bool IsAccountSensitiveAndCannotBeDelegated { get; }
        bool IsCannotChangePassword { get; }
        bool IsPasswordExpired { get; }
        bool IsPasswordNeverExpires { get; }
        bool IsPasswordNotRequired { get; }
        bool IsSmartCardRequired { get; }
        byte[] JpegPhoto { get; }
        ILocationAttributes LocationAttributes { get; }
        IReadOnlyList<string> ManagedObjects { get; }
        int MSDSFailedInteractiveLogonCount { get; }
        int MSDSFailedInteractiveLogonCountAtLastSuccessfulLogon { get; }
        DateTime? LockoutTime { get; }
        DateTime? LockoutTimeUTC { get; }
        DateTime? MSDSLastFailedInteractiveLogonTime { get; }
        DateTime? MSDSLastFailedInteractiveLogonTimeUTC { get; }
        DateTime? MSDSLastSuccessfulInteractiveLogonTime { get; }
        DateTime? MSDSLastSuccessfulInteractiveLogonTimeUTC { get; }
        string MSDSResultantPSO { get; }
        /// <summary>
        /// This attribute indicates the time when the password of the object will expire. 
        /// Let TO be the object on which the attribute msDS-UserPasswordExpiryTimeComputed is read.
        /// If TO is not in a domain NC, then TO!msDS-UserPasswordExpiryTimeComputed = null. 
        /// Otherwise let D be the root of the domain NC containing TO.
        /// The DC applies the following rules, in the order specified below, to determine the value of TO!msDS-UserPasswordExpiryTimeComputed:
        ///   If any of the ADS_UF_SMARTCARD_REQUIRED, ADS_UF_DONT_EXPIRE_PASSWD, ADS_UF_WORKSTATION_TRUST_ACCOUNT, ADS_UF_SERVER_TRUST_ACCOUNT, ADS_UF_INTERDOMAIN_TRUST_ACCOUNT bits is set in TO!userAccountControl, then TO!msDS-UserPasswordExpiryTimeComputed = 0x7FFFFFFFFFFFFFFF.
        ///   Else, if TO!pwdLastSet = null, or TO!pwdLastSet = 0, then TO!msDS-UserPasswordExpiryTimeComputed = 0.
        ///   Else, if Effective-MaximumPasswordAge = 0x8000000000000000, then TO!msDS-UserPasswordExpiryTimeComputed = 0x7FFFFFFFFFFFFFFF(where Effective - MaximumPasswordAge is defined in [MS - SAMR] section 3.1.1.5).
        ///   Else, TO!msDS-UserPasswordExpiryTimeComputed = TO!pwdLastSet + Effective-MaximumPasswordAge(where Effective-MaximumPasswordAge is defined in [MS-SAMR] section 3.1.1.5).
        /// </summary>
        DateTime? MSDSUserPasswordExpiryTimeComputedUTC { get; }
        DateTime? MSDSUserPasswordExpiryTimeComputed { get; }
        DateTime? MSTSExpireDateUTC { get; }
        string MSTSHomeDrive { get; }
        string MSTSProfilePath { get; }
        string MSTSWorkDirectory { get; }
        IOrganizationAttributes OrganizationAttributes { get; }
        string ProfilePath { get; }
        IRemoteDesktopAttributes RemoteDesktopAttributes { get; }
        string ScriptPath { get; }
        string Surname { get; }
        ITelephoneAttributes TelephoneAttributes { get; }
        byte[] ThumbnailPhoto { get; }
        string UserPrincipalName { get; }
        IReadOnlyList<string> UserWorkstations { get; }
    }
}
